function GetElementByCls(className, tag, parent){
	parent = parent || document;

	tag = tag || '*';
	if(!(parent = $(parent))){
		return false;
	}
	var tags = (tag =='*' && parent.all) ? parent.all : parent.getElementsByTagName(tag);
	var elements = new Array();	
	className = className.replace(/\-/g, '\\-');
	var regex = new RegExp('(^|\\s)' + className + '(\\s|$)');
	var element;
	var test_method = true;
	for(var i=0,l=tags.length; i<l; i++){
		element = tags[i];
		if(test_method){//true -> use this
			testclassname = element.getAttribute('className');
			if(!testclassname){
				test_method = false;
			}				
		}
		if(!test_method){ //false -> use this
			testclassname = element.getAttribute('class');
		}
		if(regex.test(element.className)){
			elements.push(element);
		}
	}
	return elements;
}